<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>9.26 课后作业</title>
</head>

<body>
    <script>
        let person = {
            name: "张三", age: 20,
            greet() { console.log(`我是${this.name}，我今年${this.age}`) }
        }
        console.log("对象属性引用:", person.name, person["age"])
        person.greet()

        let user = new Object()
        user.name = "Make"
        user.email = "241305@edu"
        user.put = (name, email) => console.log(`我是${this.name},我的邮箱是${email}`)
        user.put(user.name, user.email)


        function Student(name, grade) {
            this.name = name
            this.grade = grade
            this.study = () => console.log(`${this.name}在学习`)
        }
        const stu = new Student("李四", 3)
        stu.study()

    </script>
</body>

</html>